import { http } from "@/utils/http";
type ResultTable = {
  total?: number;
  data?: Array<any>;
};

// 新增报表
export const insertVerifyReport = (data?: object, cb?: (err: any) => any) => {
  return http.request(
    "post",
    `/operation/api/v1/VerifyReport/insertVerifyReport`,
    {
      data
    },
    { headers: { noLoading: true } },
    cb
  );
};
// 查询报表
export const queryVerifyReport = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/VerifyReport/queryVerifyReport`, {
    data
  });
};
// 查询报表附件
export const queryVerifyReportAttach = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/VerifyReport/queryVerifyReportAttach`, {
    data
  });
};
// 编辑报表
export const updateVerifyReport = (data?: object, cb?: (err: any) => any) => {
  return http.request(
    "post",
    `/operation/api/v1/VerifyReport/updateVerifyReport`,
    {
      data
    },
    { headers: { noLoading: true } },
    cb
  );
};

// 删除报表
export const deleteVerifyReport = (id: number) => {
  return http.request("get", `/operation/api/v1/VerifyReport/deleteVerifyReport/${id}`);
};
// 查询校验信息
export const queryVerifyCheck = (data?: object) => {
  return http.request("post", `/operation/api/v1/VerifyReport/queryVerifyCheck`, {
    data
  });
};
// 插入校验信息
export const insertVerifyCheck = (data?: object) => {
  return http.request("post", `/operation/api/v1/VerifyReport/insertVerifyCheck`, {
    data
  });
};
// 查询报表详情
export const queryVerifyReportDetail = (data?: object) => {
  return http.request("post", `/operation/api/v1/VerifyReport/queryVerifyReportDetail`, {
    data
  });
};
